const KEY_PREFIX = 'Y-'
const KEY_TOKEN = 'BBS-TOKEN'
const invalids = [undefined, null, 'undefined', 'null']

export function getToken() {
  return get('access_token')
}

export function setToken(token) {
  set('access_token',token)
}

export function removeToken() {
  return remove('access_token')
}

export function get(key) {
  return localStorage.getItem(KEY_PREFIX + key)
}

export function set(key, val) {
  localStorage.setItem(KEY_PREFIX + key, val)
}

export function remove(key) {
  localStorage.removeItem(KEY_PREFIX + key)
}
